home *** CD-ROM | disk | FTP | other *** search
- Path: mother.usf.edu!grad!millert
- From: Timothy Miller <millert@csee.usf.edu>
- Newsgroups: gnu.g++.help,comp.lang.c++
- Subject: 3Q's: stdio.h, unary minus, declaration/definition
- Date: Thu, 7 Mar 1996 14:52:15 -0500
- Organization: University of South Florida
- Message-ID: <Pine.SUN.3.91.960307143932.2763A-100000@grad>
- NNTP-Posting-Host: grad.csee.usf.edu
- Mime-Version: 1.0
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- X-Sender: millert@grad
-
- Should g++ have a stdio.h file? The installation here didn't have one,
- and when I complained about it, the admins completely reinstalled g++.
- It was STILL missing stdio.h. They told me that they FTP'd it twice and
- were very careful about the installation, but it just doesn't have
- stdio.h. I need it for things like sscanf.
-
- ---
-
- If I have a member function that overloads the unary minus operator, is
- the 'this' object the object that the minus is attached to, or is it a
- temporary copy?
-
- ---
-
- I have Stroustrup's book on C++, and his use of the terms 'declaration'
- and 'definition' are odd to me.
-
- I was taught that a definition is something that simply describes the
- structure of something, such as a function prototype, a struct
- description, an extern statement, or or anything that doesn't create or
- state an actual object but refers to an actual object somewhere else or
- describes what something should look like.
-
- A declaration is where an actual instance of something is given or
- created. An actual function, a local or global variable statement, etc.
-
- But Stroustrup seems to get them mixed up a bit. He calls an extern a
- declaration... but it's not declaring anything... it's simply defining
- what the object elsewhere looks like. He calls a statement that creates
- an actual variable a definition, but you're not defining it, you're
- declaring it to actually exist there. With a few exceptions,
- Stroustrup's book uses definition and declaration completely reverse of
- what I was taught in school and by books on programming C that I have read.
-
- Is he making a mistake or am I?
-
- ---------------------------------------------------------------------------
- Timothy Miller, millert@grad.csee.usf.edu Theoretical Linguistics
- http://www.csee.usf.edu/~millert Music Theory, Computer Engineering
- ---------------------------------------------------------------------------
- Cunning linguists are very skilled with their tongues.
-
-